;-------loader and kernel---------
LOADER_BASE_ADDR equ 0x900
LOADER_START_SECTOR equ 0x2

PAGE_DIR_TABLE_POS equ 0x00100000

KERNEL_BIN_BASE_ADDR equ 0x00070000
KERNEL_ENTRY_POINT equ 0x00001500
KERNEL_START_SECTOR equ 0x00000009

;-------GDT-----------------------
DESC_G_4K		equ	1_00000000000000000000000B	;unit is 4kb
DESC_D_32		equ	1_0000000000000000000000B	;32bit system code segment
DESC_L			equ	0_000000000000000000000B	;32bit system
DESC_AVL		equ	0_00000000000000000000B		;AVL bit
DESC_LIMIT_CODE2	equ	1111_0000000000000000B	
DESC_LIMIT_DATA2	equ	DESC_LIMIT_CODE2
DESC_LIMIT_VIDEO2	equ	0000_0000000000000000B
DESC_P			equ	1_000000000000000B
DESC_DPL_0		equ	00_0000000000000B
DESC_DPL_1		equ	01_0000000000000B
DESC_DPL_2		equ	10_0000000000000B
DESC_DPL_3		equ	11_0000000000000B
DESC_S_SYS		equ	0_000000000000B
DESC_S_CODE		equ	1_000000000000B
DESC_S_DATA		equ	DESC_S_CODE
DESC_TYPE_CODE		equ	1000_00000000B			;x=1,c=0,r=0,a=0
DESC_TYPE_DATA		equ	0010_00000000B			;x=0,e=0,w=1,a=0

DESC_CODE_HIGH4		equ	(0x00 << 24) + DESC_G_4K + DESC_D_32 + \
				DESC_L + DESC_AVL + DESC_LIMIT_CODE2 + \
				DESC_P + DESC_DPL_0 + DESC_S_CODE + DESC_TYPE_CODE + 0x00

DESC_DATA_HIGH4		equ	(0x00 << 24) + DESC_G_4K + DESC_D_32 + \
				DESC_L + DESC_AVL + DESC_LIMIT_DATA2 + \
				DESC_P + DESC_DPL_0 + DESC_S_DATA + DESC_TYPE_DATA + 0x00

DESC_VIDEO_HIGH4	equ	(0x00 << 24) + DESC_G_4K + DESC_D_32 + \
				DESC_L + DESC_AVL + DESC_LIMIT_VIDEO2 + \
				DESC_P + DESC_DPL_0 + DESC_S_DATA + DESC_TYPE_DATA + 0x0b

;---------Selector------------
RPL0			equ	00B
RPL1			equ 	01B
RPL2			equ 	10B
RPL3			equ	11B

TI_GDT			equ	0_00B
TI_LDT			equ	1_00B

;-----------Page--------------
PG_P 			equ 	1B
PG_RW_R			equ	0_0B
PG_RW_W			equ	1_0B
PG_US_S			equ 	0_00B
PG_US_U			equ	1_00B

;------program type--------------
PT_NULL equ 0



